package com.ph.myblog.entity;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id; 
import javax.persistence.ManyToOne; 
 

@Entity
public class Article implements Serializable {

	private Integer id;
	private String title;
	private String description;
	private Calendar publishTime;
	private Articletype type;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getTitle() {
		return title;
	}
	 
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Calendar getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Calendar publishTime) {
		this.publishTime = publishTime;
	} 
	
	@ManyToOne
	public Articletype getType() {
		return type;
	}

	public void setType(Articletype type) {
		this.type = type;
	} 
}
